- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!!
I am working with the Nios II IDE version 5.0 and trying to introduce a software design into a Cyclone II DSP which FPGA is the EP2C35 that previously has been hardware-programmed with a SOPC builder design. Once I have opened a project(in my case count library) have tried to build it and always have given the same problem: make -s all Compiling count_binary.c... Linking count_binary_0.elf... obj/count_binary.o(.text+0x3d8): In function `main': ../count_binary.c:324: undefined reference to `fopen' collect2: ld returned 1 exit status make: *** [count_binary_0.elf] Error 1 Build completed Could anybody help me? I am totally desesperated!! Thanks a lot P.D:the fopen is for opening the device driver of a LCDLink Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ieup,
do you include the file which defines fopen?! Cheers, Danny- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes I have a header file that has all the "includes" included
That is why I do not understand where the error is Thanks for your answer ieup- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ieup,
sounds like your linker does not refer to the std libraries. In your project properties, C/C++ Build -> Tool Settings -> Linker -> General add 'c' to Libraries and the path to libc to Library Paths. You could also try the compiler flag -fno-builtin-<function name> to tell the compiler to use fopen. hope this helps, --wolf
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page