User forums > Using Code::Blocks

Add existing file to a project

<< < (4/4)

erotavlas:

--- Quote from: xunxun1982 on November 18, 2010, 10:51:45 am ---
--- Quote from: erotavlas on November 18, 2010, 10:29:20 am ---Thank you for your answer. I have not said that I'm under windows 7 with cygwin bash shell and g++/gcc  4.3.4 version1 compiler. I'm still trying to solve the problem, other suggestions are well accepted. Thank in advanced.

--- End quote ---
I think cygwin gcc only recognize the path like "/cygdrive/", so if you use windows path, the gcc compiler may work wrongly.
Could you try to use mingw gcc?

--- End quote ---


The result with mingw is the same. Now I will try to put the project in c:\myproject. I hope that it works because it's the last my idea, could be windows (cygwin, minGW) the problem?

oBFusCATed:
You're joking...

1. Have you tried to replace #include "file4.h" with #include "../data1/file4.h" or #include "data1/file4.h"?
2. Have you tried to add "./data1/" to the include paths?

xunxun:
If you have tried replace the "file4.h" with #include "../data1/file4.h", and you have added the include path, we felt very strange. If you have some web space such as Web Disk, you can upload the project to the space.

erotavlas:

--- Quote from: oBFusCATed on November 18, 2010, 11:11:19 am ---You're joking...

1. Have you tried to replace #include "file4.h" with #include "../data1/file4.h" or #include "data1/file4.h"?
2. Have you tried to add "./data1/" to the include paths?


--- End quote ---

I have substituted all #include "file4.h" with #include "../data1/file4.h"
If I put all path "c:/myproject/data1/file4.h" it works perfectly.  I can't understand why, but I'm very happy. :D

Navigation

[0] Message Index

[*] Previous page

Go to full version