I just got a new laptop and I reinstalled cygwin, selected bin for gcc-g++ and make, but now I can't seem to compile anything! I tried all the new stuff and even gfind, which has it's own compilation page on the wiki! I keep getting this error every time:
/tmp/ccxGzwWp.o:gfind.c:(.text+0x4d9): undefined reference to `qIsEmpty'
/tmp/ccxGzwWp.o:gfind.c:(.text+0x4d9): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `qIsEmpty'
/tmp/ccxGzwWp.o:gfind.c:(.text+0x936): undefined reference to `enqueue'
/tmp/ccxGzwWp.o:gfind.c:(.text+0x936): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `enqueue'
/tmp/ccxGzwWp.o:gfind.c:(.text+0x981): undefined reference to `setVisited'
/tmp/ccxGzwWp.o:gfind.c:(.text+0x981): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `setVisited'
/tmp/ccxGzwWp.o:gfind.c:(.text+0x3af5): undefined reference to `isVisited'
/tmp/ccxGzwWp.o:gfind.c:(.text+0x3af5): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `isVisited'
/tmp/ccxGzwWp.o:gfind.c:(.text+0x3b0a): undefined reference to `enqueue'
/tmp/ccxGzwWp.o:gfind.c:(.text+0x3b0a): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `enqueue'
/tmp/ccxGzwWp.o:gfind.c:(.text+0x3b5a): undefined reference to `pop'
/tmp/ccxGzwWp.o:gfind.c:(.text+0x3b5a): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `pop'
/tmp/ccxGzwWp.o:gfind.c:(.text+0x3b73): undefined reference to `setVisited'
/tmp/ccxGzwWp.o:gfind.c:(.text+0x3b73): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `setVisited'
/tmp/ccxGzwWp.o:gfind.c:(.text+0x3b8c): undefined reference to `setVisited'
/tmp/ccxGzwWp.o:gfind.c:(.text+0x3b8c): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `setVisited'
/tmp/ccxGzwWp.o:gfind.c:(.text+0x5c08): undefined reference to `pop'
/tmp/ccxGzwWp.o:gfind.c:(.text+0x5c08): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `pop'
/tmp/ccxGzwWp.o:gfind.c:(.text+0x6029): undefined reference to `dequeue'
/tmp/ccxGzwWp.o:gfind.c:(.text+0x6029): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `dequeue'
/tmp/ccxGzwWp.o:gfind.c:(.text+0x6042): undefined reference to `qIsEmpty'
/tmp/ccxGzwWp.o:gfind.c:(.text+0x6042): additional relocation overflows omitted from the output
/tmp/ccxGzwWp.o:gfind.c:(.text+0x62f7): undefined reference to `enqueue'
/tmp/ccxGzwWp.o:gfind.c:(.text+0x635a): undefined reference to `dequeue'
/tmp/ccxGzwWp.o:gfind.c:(.text+0x6363): undefined reference to `enqueue'
collect2: error: ld returned 1 exit status
And it doesn't generate an executable version. Help please?
I think I answered this particular question here. Specifically, if you compile with the -O3 flag these errors should go away. You should be compiling with -O3 anyway, because it makes the program faster.
It says there is no such directory. And yes I am in the right folder.
There is 1 error, but I have already turned off my laptop so I'm a bit lazy to post it.
fluffykitty wrote:What if my compiler doesn't support -fopenmp?
"-fopenmp" is a compiler flag for the GCC compiler. For other compilers you may need to do something different. Try googling how to compile OpenMP with your preferred compiler. If your compiler doesn't support OpenMP at all, then you can compile my new program (see here) by removing the two lines that say