Free Downloads, Community Forum,
FAQs and Developer Resources


Make /Tools Your Home | Link to us

Today's posts | Posts since last visit | Most Active Topics

All Forums Register Login Search Subscriptions My Profile Inbox
Tool Warehouse FAQs Resources Help Member List Address Book Logout

MSVC and Interix

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [SFU / Interix / SUA Technology] >> Interix Advanced Forum >> MSVC and Interix Page: [1]
Login
Message << Older Topic   Newer Topic >>
MSVC and Interix - Oct. 21, '04, 8:05:08 PM   
jonsmi

 

Posts: 168
Joined: Aug. 12, '03,
From: Oslo, Norway
Status: offline
There appears to be a serious bug in gcc 3.3:
/opt/gcc.3.3/lib/gcc-lib/i586-pc-interix3/3.3/../../../../i586-pc-interix3/bin/l
d: BFD 2.13.90 20021111 assertion fail /dev/fs/C/gnu2.intel/egcs.source/bfd/coff
link.c:5211

(Any workarounds -- this code compiles fine on Linux with gcc 3.3?)

If my understanding is correct, you can use cl.exe with Interix, the restriction being
that it's C and not C++ code (has MS gone completely mad, who's not going OO these
days; in Norway we actually had Simula-67 from 1967 on -- invented here -- and heavily
influenced C++).

All right then, in my two cases it's plain vanilla C code. But how, do you set it up
then? Some KBs/white papers say the best solution is to install MSVC first and then
SFU or the SDK -- I did, nothing happened.

First the download: Microsoft's Visual C++ Toolkit 2003, free as in free beer
http://msdn.microsoft.com/visualc/vctoolkit2003/

OK, then the manual approach:
(1) Add it to your path:
%echo $PATH
/usr/X11/bin:/usr/local/qt/bin:/usr/local/vtcl:/usr/local/bin:/bin:/opt/gcc.3.3/
bin:/usr/contrib/bin:/usr/X11R6/bin:/usr/local/bin:/usr/contrib/win32/bin:/dev/f
s/C/WINDOWS/system32:/dev/fs/C/SFU/common:/usr/games:/dev/fs/C/Documents and Set
tings/Administrator.AYLANET/scripts[b]:/dev/fs/C/PROGRA~1/MIA4C6~1/bin[/b]
%

Fine, works:
%cl.exe
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.

usage: cl [ option... ] filename... [ /link linkoption... ]
%

And then the environment variables:
%env | grep INTERIX_COMPILERDIR
INTERIX_COMPILERDIR=/dev/fs/C/PROGRA~1/MIA4C6~1/bin
%env | grep C89_COMPILER
C89_COMPILER=/dev/fs/C/PROGRA~1/MIA4C6~1/bin
%

BTW, this is long file name handling (use dir /x to find out):
C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin

Well, what is missing?
%make
c89 -g -c -DYYDEBUG=1 -DLEXDEBUG -I/usr/local/include -c rinfo.c
c89: Cannot find compiler '/dev/fs/C/PROGRA~1/MIA4C6~1/bin' in PATH
c89: Either set the C89_COMPILER environment variable or add the
     directory that contains the CL.EXE program to PATH
*** Error code 127

Stop.
%
Post #: 1
RE: MSVC and Interix - Oct. 21, '04, 9:34:44 PM   
jimraf

 

Posts: 17
Joined: Apr. 22, '03,
From: Boston, MA
Status: offline
I think the C89_COMPILER variable has to point at the full path and file name of the .EXE, not just the directory.

So instead of C89_COMPILER=/dev/fs/C/PROGRA~1/MIA4C6~1/bin, try C89_COMPILER=/dev/fs/C/PROGRA~1/MIA4C6~1/bin/cl.exe

It's case sensitive and some versions of MSVC seem to install the compiler as CL.EXE, other versions as cl.exe, so be sure to check the proper case when constructing the Interix environment variable.

(in reply to jonsmi)
Post #: 2
RE: MSVC and Interix - Oct. 21, '04, 11:59:55 PM   
Rodney

 

Posts: 3714
Joined: Jul. 9, '02,
From: /Tools lab
Status: online
quote:


/opt/gcc.3.3/lib/gcc-lib/i586-pc-interix3/3.3/../../../../i586-pc-interix3/bin/l
d: BFD 2.13.90 20021111 assertion fail /dev/fs/C/gnu2.intel/egcs.source/bfd/coff
link.c:5211


Seriously this error message is all smoke, no fire. You can ignore it.

For the setting of cc and c89 when MSVC is installed after
the SDK's I'll refer you to the MS web page:
http://support.microsoft.com/default.aspx?scid=kb;en-us;246432

That's the short version of the information. Alas, the web page that it
points to for the full White paper on the subject was moved to:
http://www.microsoft.com/windows2000/migrate/unix/msvc.asp

(in reply to jimraf)
Post #: 3
RE: MSVC and Interix - Oct. 22, '04, 12:55:54 AM   
markfunk

 

Posts: 670
Joined: Mar. 31, '03,
Status: offline
1) Do not set C89_COMPILER unless you know exactly how /bin/cc and /bin/c89 works and that this is exactly what you want to do.

2) In your case, I suggest you set INTERIX_COMPILERDIR=C:/PROGRA~1/MIA4C6~1
in your global Window's env. variables and then start up a new Interix shell window.

(in reply to Rodney)
Post #: 4
RE: MSVC and Interix - Oct. 22, '04, 7:03:55 AM   
jonsmi

 

Posts: 168
Joined: Aug. 12, '03,
From: Oslo, Norway
Status: offline
quote:

I think the C89_COMPILER variable has to point at the full path and file name of the .EXE, not just the directory.

So instead of C89_COMPILER=/dev/fs/C/PROGRA~1/MIA4C6~1/bin, try C89_COMPILER=/dev/fs/C/PROGRA~1/MIA4C6~1/bin/cl.exe

It's case sensitive and some versions of MSVC seem to install the compiler as CL.EXE, other versions as cl.exe, so be sure to check the proper case when constructing the Interix environment variable.

Yes, for the C89_COMPILER it seems you're right. It was a small library, with
a Makefile without a configure, by default looking for CL.EXE (not cl.exe).
Also, it works with adding the CL.EXE to the C89_COMPILER variable (after renaming
cl.exe to CL.EXE).

This was a quick and dirty solution, which surely could have been handled more elegant,
but it does its job. Thanks for pointing this oversight out!

(in reply to jimraf)
Post #: 5
RE: MSVC and Interix - Oct. 22, '04, 9:29:50 AM   
jonsmi

 

Posts: 168
Joined: Aug. 12, '03,
From: Oslo, Norway
Status: offline
quote:

quote:
/opt/gcc.3.3/lib/gcc-lib/i586-pc-interix3/3.3/../../../../i586-pc-interix3/bin/l
d: BFD 2.13.90 20021111 assertion fail /dev/fs/C/gnu2.intel/egcs.source/bfd/coff
link.c:5211

Seriously this error message is all smoke, no fire. You can ignore it.

You're completely right. Thought
the Oracle was "traveling in the north country fair
Where the winds hit heavy on the borderline" (Dylan).

And the smoke overshadowed these errors, which likely have to be resolved.
However, libglade-2.4.0 (part of the new stable GNOME 2.8 libraries) does
install!
checking for pkg-config... /usr/local/bin/pkg-config
checking for GTK+ - version >= 2.4.0... no
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occurred. This usually means GTK+ is incorrectly installed.
checking for gtk_plug_get_type... no

// This is the Interop version:
// felicia:~# pkg_info | grep gtk
// gtk+-2.4.1.3-bin   Version gtk+ of 2.4.1.3 for Interix 3.5.

checking for xgettext... /usr/local/bin/xgettext
./configure[11081]: cannot open ./po/POTFILES.in: No such file or directory

// the GNU version -- here I must have made a mistake

Still a Makefile will be created.

As to the links, the second should confirm the configuration of
the environment variable INTERIX_COMPILERDIR. I used this link:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnucmg/html/ucmgch07.asp

(in reply to Rodney)
Post #: 6
RE: MSVC and Interix - Oct. 22, '04, 9:39:02 AM   
jonsmi

 

Posts: 168
Joined: Aug. 12, '03,
From: Oslo, Norway
Status: offline
quote:

1) Do not set C89_COMPILER unless you know exactly how /bin/cc and /bin/c89 works and that this is exactly what you want to do.

2) In your case, I suggest you set INTERIX_COMPILERDIR=C:/PROGRA~1/MIA4C6~1
in your global Window's env. variables and then start up a new Interix shell window.

As to (1): No, I won't and don't know, and don't want to know too much either. I'll
stick to Open Source, but was in the false belief that gcc wouldn't manage to
compile libglade.

As to (2): That's what I did.

And thanks to you all. There are not many sites where you can talk directly with
the source. And that is one of the real strengths of Interix, the Interop community.

(in reply to markfunk)
Post #: 7
RE: MSVC and Interix - Feb. 9, '05, 4:46:13 PM   
magus1011

 

Posts: 15
Status: offline
This is probably obvious, but if I have two cl.exe's can I add both to the INTERIX_COMPILEDIR?

I have VS6 and the new vctoolkit2003 and about a dozen other compilers/assemblers. Why? I beta test an IDE for compilers and assemblers. I'm interested in knowing how many compilers I can add to Interix. Being able to add multiple tools would be a useful idea for something that is described as being useful for cross platform development since often many languages are used in one project. For example COBOL, Assembler and C is a language combination that is found fairly often where I live.

--
Best Regards,
Magus.

(in reply to jonsmi)
Post #: 8
RE: MSVC and Interix - Feb. 9, '05, 11:49:29 PM   
Rodney

 

Posts: 3714
Joined: Jul. 9, '02,
From: /Tools lab
Status: online
> This is probably obvious, but if I have two cl.exe's can I add both to the INTERIX_COMPILEDIR?

I wouldn't recommend it.

What you probably want to to instead is make a copy of c89 or cc
to another name (let's call it cc_m). Then edit cc_m and change
the env vars it depends on for those env vars that you want to vary based on
which CL.EXE (or whatever) you want to run. So make an INTERIX_COMPILEDIR_M.
This would help to keep things clear between each. I suppose you could also
edit cc and conditionalize it on a new environment variable too.

(in reply to magus1011)
Post #: 9
RE: MSVC and Interix - Feb. 10, '05, 8:00:57 PM   
magus1011

 

Posts: 15
Status: offline
Thanks Rodney. I think I'll go with your suggestion and see what happens.

--
Best Regards,
Magus.

(in reply to Rodney)
Post #: 10
Page:   [1]
All Forums >> [SFU / Interix / SUA Technology] >> Interix Advanced Forum >> MSVC and Interix Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Search All Forums -

Advanced search


SPONSORS



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.047