Author Topic: Add existing file to a project  (Read 34959 times)

Offline erotavlas

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Add existing file to a project
« Reply #15 on: November 18, 2010, 11:04:07 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.
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?


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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11643
    • Travis build status
Re: Add existing file to a project
« Reply #16 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?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline xunxun

  • Almost regular
  • **
  • Posts: 187
Re: Add existing file to a project
« Reply #17 on: November 18, 2010, 11:15:30 am »
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.
Regards,
xunxun

Offline erotavlas

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Add existing file to a project
« Reply #18 on: November 18, 2010, 11:31:25 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?


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