"Unknown Compiler Version" building dc++ 0.262

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 07:38
Location: Sweden, Linkoping

"Unknown Compiler Version" building dc++ 0.262

Post by joakim_tosteberg » 2003-09-26 16:28

Then I try to build dc++ 0.262 (unmodified code) in release build with vs .net 2003 di I get an error mssage saying:

Code: Select all

windows\main.cpp(54) : fatal error C1189: #error :  Unknown Compiler version
All earlier version of dc++ have worked well and it doeas also work well in debug configuration. Do anyone know why I´m having this problem?

I do also have some questions about the files generated in debug build, what is the DCPlusPlus.ilk file good for?

Edit: I can get it to compile if change this:

Code: Select all

#ifndef _DEBUG
#if _MSC_VER == 1200
   __pfnDliFailureHook = FailHook;
#elif _MSC_VER == 1300
   __pfnDliFailureHook2 = FailHook;
#else
   #error Unknown Compiler version
#endif


To this:

Code: Select all

#ifndef _DEBUG
#if _MSC_VER == 1200
   __pfnDliFailureHook = FailHook;
#elif _MSC_VER == 1300
   __pfnDliFailureHook2 = FailHook;
#else
   //#error Unknown Compiler version
#endif


As you see does it compile if I comments the line generating this error, but I don´t think this is a good solution. Anyone having an better idea?

Gasman1015
Posts: 184
Joined: 2003-05-26 16:29
Location: UK

Post by Gasman1015 » 2003-09-26 18:09

This is from my copy of main.cpp and it compiles ok.

Code: Select all

#ifndef _DEBUG
#if _MSC_VER == 1200
   __pfnDliFailureHook = FailHook;
#elif _MSC_VER == 1300
   __pfnDliFailureHook2 = FailHook;
#else
#error Unknown Compiler version
#endif
Always remember you're unique, just like everyone else.

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 07:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2003-09-26 18:49

I found a good solution for this problem now, I hade to change:

Code: Select all

#ifndef _DEBUG
#if _MSC_VER == 1200
   __pfnDliFailureHook = FailHook;
#elif _MSC_VER == 1300
   __pfnDliFailureHook2 = FailHook;
#else
#error Unknown Compiler version
#endif


to

Code: Select all

#ifndef _DEBUG
#if _MSC_VER == 1200
   __pfnDliFailureHook = FailHook;
#elif _MSC_VER == 1300 || 1310                 // The || 1310 here was added(The version number  for vs .net 2003?).
   __pfnDliFailureHook2 = FailHook;
#else
#error Unknown Compiler version
#endif

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-08 02:46
Location: .pa.us

Post by GargoyleMT » 2003-09-26 23:05

Isn't this one of the changes in the patch for .NET against 0.242 that I recently made sticky? :-D

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 07:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2003-09-27 04:39

Sorry for that, it was just that it compiled in debug mode and that I did get none of the other problems fixed by patch which made me thought this was a new problem :oops: .

Who is online

Users browsing this forum: Google [Bot] and 0 guests