User forums > General (but related to Code::Blocks)

Linking error

(1/2) > >>

abraker95:
I'm trying to compile a library, and I am getting a link time error. People said that the code compiles in
Visual C++ just fine, but Code::Blocks has a problem.

The error is undefined reference to `_strtoui64(char const*, char**, int)'
That function is declared in stdio.h

Please help ASAP!!! :(

ollydbg:
You need to supply more information and ask a smart question.
Here is my mild guess :D
If you use VC++ compiler in Codeblocks, I think this is not a problem.
I suppose you use MinGW, so these two compilers may have different header files.

abraker95:
I'm trying to make a dll out of the Raknet library, and it gives me a linktime error. I don't think it's the header file(s) since stdio.h is a standard C header. Yes I'm using MinGW. How can a standard C library have linking problems?

xunxun:

--- Quote from: abraker95 on January 05, 2011, 04:53:58 am ---I'm trying to make a dll out of the Raknet library, and it gives me a linktime error. I don't think it's the header file(s) since stdio.h is a standard C header. Yes I'm using MinGW. How can a standard C library have linking problems?

--- End quote ---

No, on MinGW, strtoui64 is defined in "stdlib.h", not "stdio.h".

abraker95:
I looked at http://msdn.microsoft.com/en-us/library/85zk715d(v=vs.80).aspx and it like there areGeneric-Text Routine Mappings(???) Would declaring the wrong one cause the error?

Navigation

[0] Message Index

[#] Next page

Go to full version