Author Topic: odd problem with Projects/targets  (Read 3599 times)

Offline jdg

  • Single posting newcomer
  • *
  • Posts: 4
odd problem with Projects/targets
« on: March 08, 2006, 09:11:02 pm »
I'm new to C:B so please be patient. I'm using C:B and the VC 2003 compiler. I did a sample exe program and sorted out all the libraries I needed. It eventually worked fine. I now want to create an API-based DLL which I have converted from a VC6 project. I got this error:

"fatal error C1083: Cannot open compiler generated file: 'D:\Documents and Settings\James\Mes documents\.objs\C:\ezife\ezife7.1\ezife.obj': Invalid argument Process terminated with status 1 (0 minutes, 0 seconds)"

This seemed a simple problem with the default file directories in the projects/targets box, but I could not alter the source file paths within the IDE, so I edited the cbp file to remove the paths of ezife.cpp, api_grid.cpp and languagefile.cpp which led to this error:

"fatal error LNK1181 cannot open input file 'D:\Documents and Settings\James\Mes documents\.objs\ezife.obj"

Well Of course the file ezife.obj hasn't been created yet. I used Build/clean to attempt to force the ide to start from scratch but it still reports the same error. I cannot see what to try next because there is no apparent logic to this problem; I hope it makes sense to someone else though. Can anyone help?

here is the cbp file:

<?xml version="1.0"?>
<!DOCTYPE CodeBlocks_project_file>
<CodeBlocks_project_file>
<FileVersion major="1" minor="1"/>
<Project>
<Option title="Win32 Application"/>
<Option makefile="Makefile"/>
<Option makefile_is_custom="0"/>
<Option active_target="0"/>
<Option compiler="1"/>
<Build>
<Target title="default">
<Option output="femtools.dll"/>
<Option working_dir="."/>
<Option object_output="D:\Documents and Settings\James\Mes documents\.objs"/>
<Option deps_output="D:\Documents and Settings\James\Mes documents\.deps"/>
<Option type="0"/>
<Option compiler="1"/>
<Option includeInTargetAll="0"/>
<Option projectResourceIncludeDirsRelation="0"/>
<Compiler>
<Add option="/MT"/>
<Add option="/GA"/>
<Add option="/G7"/>
<Add option="/Ox"/>
<Add option="/W1"/>
</Compiler>
</Target>
</Build>
<Compiler>
<Add option="/MT"/>
<Add option="/DAPI_INTERFACE"/>
</Compiler>
<Linker>
<Add library="gdi32"/>
<Add library="user32"/>
<Add library="kernel32"/>
</Linker>
<Unit filename="C:\ezife\ezife7.1\api_grid.cpp">
<Option compilerVar="CPP"/>
<Option target="default"/>
</Unit>
<Unit filename="C:\ezife\ezife7.1\ezife.cpp">
<Option compilerVar="CPP"/>
<Option target="default"/>
</Unit>
<Unit filename="C:\ezife\ezife7.1\languagefile.cpp">
<Option compilerVar="CPP"/>
<Option target="default"/>
</Unit>
</Project>
</CodeBlocks_project_file>

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5295
Re: odd problem with Projects/targets
« Reply #1 on: March 09, 2006, 08:02:25 am »
some more questions :

1) which version of CB ?
2) you posted the cbp where the units (files) have absolute paths (I would advise relative)
You did try relative you said, can you post tht cbp, and tell exactly what Cb o the compiler says. Ask for full command line in compiler settings (for the MsVCTK).

Offline jdg

  • Single posting newcomer
  • *
  • Posts: 4
Re: odd problem with Projects/targets
« Reply #2 on: March 09, 2006, 04:00:06 pm »
Version 1 RC2, build Oct 24 2005

For the relative path example, you don't need the whole file. I just removed C:\ezife\ezife7.1\ from the paths. This seemed to work because a path without the C:\ezife\ezife7.1\ appeared in the error message - which was in the original post. ie.

"fatal error LNK1181 cannot open input file 'D:\Documents and Settings\James\Mes documents\.objs\ezife.obj"

This was the entire message. I don't know where to go from here so I am currently building a new project from the DLL wizard. Why does it see an object file as an input file? Does it man the cpp file? That might actually make sense.

I don't see how in the IDE to show the entire command line but I wish I did. It might clear things up.

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: odd problem with Projects/targets
« Reply #3 on: March 09, 2006, 04:23:51 pm »
Version 1 RC2, build Oct 24 2005

I would advice you to give a try to the latest nightly build.

Best wishes,
Michael

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5295
Re: odd problem with Projects/targets
« Reply #4 on: March 09, 2006, 04:25:31 pm »
yes, please upgrade to a recent nightly. We'll move on from that point then.