Author Topic: file path with space is truncated  (Read 7650 times)

Offline 3rdshiftcoder

  • Single posting newcomer
  • *
  • Posts: 8
file path with space is truncated
« on: November 24, 2009, 05:39:04 am »
hi-

Compiling: da4Main.cpp
mingw32-g++.exe: Files\CodeBlocks\Projects\da4\da4Main.cpp -o obj\Debug\da4Main.o: No such file or directory
mingw32-g++.exe: no input files
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

I believe one issue is if you look above that it starts out as Files instead of c:\Program Files\Projects\da4\da4Main.cpp

I am not sure how to have the build target specified accurately. I am teaching myself how to put the settings in. I found wxPack which saved me because it contains all the ".a" files and the ".dll" files.
I saw how you can specify the exact name in the linker of the dll with the -l option. It looks like if I can get help fixing this space in the path name issue it will take off running.

Thanks.
3rdshiftcoder

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: file path with space is truncated
« Reply #1 on: November 24, 2009, 05:55:37 am »
What version/SVN of Code::Blocks?
What OS?

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline 3rdshiftcoder

  • Single posting newcomer
  • *
  • Posts: 8
Re: file path with space is truncated
« Reply #2 on: November 24, 2009, 06:03:26 am »
Hi-

code blocks 8.02
wxwidgets wx 2.8.7
O/S WinXP

I'm not sure about SVN. I don't think I checked it out of SVN if I understand that acronym right. I think it was a pre-built binary downloaded from the main site.

thanks,
3rdshiftcoder

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: file path with space is truncated
« Reply #3 on: November 24, 2009, 06:46:57 am »
You should try a recent nightly, that issue should not happen then.
Look at the topics of the nightly board: http://forums.codeblocks.org/index.php/board,20.0.html .
The first topics of th ethreads includes links to the binary package (no installer) and the needed dll's (mingw10m.dll and wxwidgets) C::B is linked against.
There are also a link that tells you how to use a nightly.
It's really straightforward, no registry magic needed.


Offline 3rdshiftcoder

  • Single posting newcomer
  • *
  • Posts: 8
Re: file path with space is truncated
« Reply #4 on: November 24, 2009, 06:56:00 am »
ok jens-

Thanks. I have to fool with a nightly build tomorrow because I am already on borrowed time with sleep for the day job. It looks straightforward at a glance as you said. I bookmarked it.

I really appreciate the help -
3rdshiftcoder

Offline 3rdshiftcoder

  • Single posting newcomer
  • *
  • Posts: 8
Re: file path with space is truncated
« Reply #5 on: November 25, 2009, 06:05:18 am »
Hi Jens-

I am up and running with the sample wxWidgets code.

If you are having trouble setting up wxwidets, I put together a few
steps I took to get my project working. Please read the disclaimer at the bottom of this post.

http://forums.codeblocks.org/index.php/board,20.0.html
I went to nightly builds and downloaded a very recent build of codeBlocks.

http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef
Read the QuickRef link and run the wizard for a new project.

Add a global variable (Settings ->Global variable) named wx which is the base of the wxWidgets install.
I used a "wxPack" http://wxpack.sourceforge.net/Main/Downloads install and my base directory looked like this:
C:\SourceCode\Libraries\wxWidgets2.8
I also downloaded from the mingw site :
http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/MinGW%205.1.6/MinGW-5.1.6.exe/download

Add the setting to point to mingw dir in Settings ->Compiler ->Toolchain executable tab.

Here are my settings:

Project->Build Options->Search directories:

Under Compiler (search directories):
$(#wx)\include

Under Linker (search directories):
$(#wx)\lib\gcc_dll

I copied the 2 dll files per the nightly build instructions and put them
with codeblocks.exe in the same directory. I included the dir containing codeblocks.exe
in my win xp path variable (search how to set an environment variables in xp if you don't know).

I received a message it couldn't run my application and was looking for wxmsw28u_gcc.dll.
What I did to fix that was made an extra copy of wxmsw28u_gcc_cb.dll (one of the files from the
nightly build download) and just rename it to wxmsw28u_gcc.dll.

Now I have these 3 dll's in my codeblocks.exe directory.
1.) wxmsw28u_gcc.dll (copy of #2) and then rename)
#2) wxmsw28u_gcc_cb.dll (nightly build download)
3.) mingwm10.dll (nightly build download)

These steps worked for me but I am a beginner and there may be a better way.
I hope it is ok I posted the steps I followed with Jens and it helps another cb user.

If Jens or another more experienced user follows up and doesn't like the steps I took,
please disregard.

Thanks,
3rdshiftcoder














Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: file path with space is truncated
« Reply #6 on: November 25, 2009, 06:16:31 am »
[quote author=3rdshiftcoder link=topic=11558.msg78717#msg78717
Under Linker (search directories):
$(#wx)\lib\gcc_dll

I received a message it couldn't run my application and was looking for wxmsw28u_gcc.dll.
What I did to fix that was made an extra copy of wxmsw28u_gcc_cb.dll (one of the files from the
nightly build download) and just rename it to wxmsw28u_gcc.dll.
[/quote]

The above is very WRONG; you are using wxPack to compile wxWidgets code.
You NEED to use the wxPack DLL; not the Code::Blocks DLL.

The folder $(#wx)\lib\gcc_dll should have the needed DLL it it; please copy it to a folder in the path or to the folder holding the exe of your wxWidgets project.

Using the wrong DLL will likely result in weird and hard to solve problem in run-time.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline 3rdshiftcoder

  • Single posting newcomer
  • *
  • Posts: 8
Re: file path with space is truncated
« Reply #7 on: November 25, 2009, 06:27:47 am »
Hi stahta01-

Oops!  Sorry.

It was a very easy fix per your instructions to correct. I deleted the extra dll and put $(#wx)\lib\gcc_dll in the system path (edited my environment variable in win xp).

Thanks very much for catching that!

3rdshiftcoder