Author Topic: Importing MSVC Projects  (Read 8040 times)

JustinThyme

  • Guest
Importing MSVC Projects
« on: June 18, 2005, 09:57:35 pm »
Hey mandrav and Rick....I'm back! :wink:

Thanks for all your hard work! 8)

As you both are aware, I have had difficulty in using the feature to import projects from MSVC 6.0 or 2003.NET.  In looking over the errors, it appears to be an issue with the actual import function.  A project that compiles fine in MSVC 2003.NET Std, will give numerous errors when trying to compile with MinGW (issues with MSVC specific switches in the compile process?), and when compiling with MSVC 2003 Toolkit, it compiles, but dies on the linking.

As a point of reference...although I have dabbled with programming for years, I am an absolute complete idiot when it comes to fully understanding the command line compile process.  Yet I think I probably am good representation of many of the newbies that get into Quake game engine programming.  Many, like me, get into the Quake engine as their motivation to learn programming.  Therefore, I believe, in order for C::B to take off with the masses, in addition to meeting the needs of established programmers, it will be very important that someone who has never programmed before can just installed C::B w/MinGW (or MSVC 2003 Toolkit), download whatever source code, and have it compile just as it would if using MSVC 2003 itself (probably the majority of source projects available for download are obviously created with MSVC).

If anyone has web resources they know of that would help me to understand makefile's, the command line compile process with switches,  and exactly how either C::B or MSVC uses it's project files, that would be great.

I'll be happy to be your guinea pig in any way that helps for ironing out the import difficulties.  Just let me know what I can do.  I think you already have it, but if you want code to test with, you can download my Tremor project (it uses MSVC 2003, while the others use MSVC 6.0) at:

http://tremor.quakedev.com

Cheers!

takeshimiya

  • Guest
Importing MSVC Projects
« Reply #1 on: June 19, 2005, 03:18:39 am »
It would be great, that not only the ide haves the import functionality, but also some effort done in the current, existing and working portable makefiles <bakefile>, <CMake> or <boost.build>.
And perhaps that effort then contributed in those projects itself, perhaps bakefile, as it's the current makefile generator that wxWidgets uses.

I strongly believe that it would be the best and most needed thing regarding crossplatform development.

Currently you can do bakefile->MSVC project, or bakefile->unix makefile, etc, but you can't do the inverse (MSVC->bakefile).

Anyways the first step is to add the necesary (Python) code to the bakefile project so you can do a bakefile->C::B project.
That way, for sure, the next releases of wxWidgets would come with C::B projects.

Anyone wants to do that? I don't think it would be difficult to code (anyone with understanding of Python perhaps).

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Importing MSVC Projects
« Reply #2 on: July 04, 2005, 11:09:54 am »
Gee, another one of my posts disappeared because of the server change  :cry:
Anyway...

Justin, sorry for taking this long to reply. I 've found the time to fiddle with tremor and see why you couldn't compile it.

1) Using VC toolkit.
Compiles fine but fails to link. This happens because you have a couple of assembly files in your project, which C::B doesn't compile nor link. I 've never used assembly (aside for ZX Spectrum, back in '81 :) ), so I don't know the necessary commands. I guess MASM will be needed.
If you know the commands or can make your MSVC "spit out" its full-command-line build log (to see how it build the assembly files), please tell me and I 'll incorporate them in your project.

2) Using MinGW
Some compiler errors are generated but I think I could overcome them, by changing the source a bit. But I fear that the above mentioned assembly files will have to be written specifically for gcc (don't quote me on this, it's just a guess).

Yiannis.
Be patient!
This bug will be fixed soon...

zieQ

  • Guest
Importing MSVC Projects
« Reply #3 on: July 12, 2005, 01:12:58 pm »
Hello,

I posted a bug report yesterday about the visual imports. I want to use CMake for automatically generating visual c++ workspace files (6 or 7), but they do not load properly into codeblocks. I got a quick look into the source and there's many things missing. Maybe i could submit a patch some day but I've no time for that now. You'll find the workspaces that led to errors attached to the bug report.

What's missing for me:
- custom commands in targets are ignored
- targets with only custom commands are ignored
- project dependencies are also ignored: consequently, no link is performed between my project libraries
- there's some errors in target file names when using full pathname

May I expect it to be solved in the final 1.0 version ?

Thanks,
zieQ

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Importing MSVC Projects
« Reply #4 on: July 12, 2005, 06:13:05 pm »
Quote from: zieQ
I got a quick look into the source and there's many things missing.

Possibly true. The importers are written by using example projects. I these projects do not contain all the features (which they do not), it's quite possible that some features cannot be yet imported.
Quote from: zieQ
Maybe i could submit a patch some day but I've no time for that now. You'll find the workspaces that led to errors attached to the bug report.

Submitting the patch would be cool. Still, I 'll look in your bug report and see if I can add what's missing.

Yiannis.
Be patient!
This bug will be fixed soon...

zieQ

  • Guest
Importing MSVC Projects
« Reply #5 on: July 13, 2005, 02:10:01 pm »
I think I 'll try to post a patch as soon as possible, but i have no time left for now.

I may have corrected the relative/full pathname bug now, but i've a problem dealing with dependencies. I'll post something about this later.

Cheers
zieQ

zieQ

  • Guest
Re: Importing MSVC Projects
« Reply #6 on: July 29, 2005, 02:57:27 pm »
The patch is posted.