User forums > Help

ar.exe: obj\Debug\main.o: No such file or directory

(1/3) > >>

creativegamer_03:
Trying to build a static library from the jsoncpp library (amalgamated version) so I can link it with my main project that uses it (but errors due to multiple "undefined references" from the library). However, it errored to (including full log):

--- Code: ----------------- Build: Debug in jsoncpp (compiler: GNU GCC Compiler)---------------

WARNING: Can't read file's timestamp: D:\_a\jsoncpp\main.c
cmd /c if exist bin\Debug\libjsoncpp.a del bin\Debug\libjsoncpp.a
ar.exe -r -s bin\Debug\libjsoncpp.a obj\Debug\main.o
ar.exe: creating bin\Debug\libjsoncpp.a
ar.exe: obj\Debug\main.o: No such file or directory
Process terminated with status 1 (0 minute(s), 1 second(s))
1 error(s), 1 warning(s) (0 minute(s), 1 second(s))
--- End code ---

When I was creating the project via the wizard, I changed no options other than name of the project. Is there something I missed or is there something wrong?

Miguel Gimenez:
Does D:\_a\jsoncpp\main.c exist? Can you remove the underscore from the path and try again?

creativegamer_03:
Well, that's the actual folder's name ("_a") since I want it above other folders when I access D:\. Anyways, should it be a .c file and not a .cpp file? The JsonCPP library is in .cpp source file format, with some header files in a separate folder in it.

File hierarchy of jsoncpp (amalgamated):

--- Code: ---./
|
---- jsoncpp
      |
      ---- json.h
      ---- json-forwards.h
|
---- jsoncpp.cpp

--- End code ---

Commaster:
So it's not D:\_a\jsoncpp\main.c but D:\_a\jsoncpp.cpp

creativegamer_03:
Oops. Sorry to confuse you about the path. The full path is actually D:\_a\jsoncpp\jsoncpp.cpp.
What I meant there is the projects folder being named "_a". I forgot to mention that "jsoncpp" is under that folder, of which this folder was created by Code::Blocks from the wizard.

Navigation

[0] Message Index

[#] Next page

Go to full version