Author |
Message
|
tczielke |
Posted: Wed Mar 04, 2015 6:46 am Post subject: Windows C compiler for building MQ programs |
|
|
Guardian
Joined: 08 Jul 2010 Posts: 941 Location: Illinois, USA
|
I am looking into finding a good (and free) C compiler for Windows. Windows Visual Studio is too large for the server that it needs to be installed on. Is anyone out there using a C compiler besides Visual Studio to build C programs for WebSphere MQ on Windows? If so, what are you using? _________________ Working with MQ since 2010. |
|
Back to top |
|
|
mqjeff |
Posted: Wed Mar 04, 2015 6:53 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
There used to be, at least, a version of Visual Studio that was *just* the standalone command line compiler. It was the free version.
You might look for that - I guess it's currently Visual Studio 2010 Express
It should have lower system requirements.
Why, in particular, do you need to install it on a machine and can't compile elsewhere and copy binaries? |
|
Back to top |
|
|
tczielke |
Posted: Wed Mar 04, 2015 7:00 am Post subject: |
|
|
Guardian
Joined: 08 Jul 2010 Posts: 941 Location: Illinois, USA
|
I have Visual Studio on my Windows 7 laptop, and can compile fine and run there. However, when I copy the executable to our Windows 2003 Server (I know, they are old), I get this error when I try and run the Windows 7 executable:
"This application has failed to start because MSVCR100.dll was not found."
I haven't spent a lot of time researching that error, but I came up empty with what time I have spent in trying to resolve it. I figured it had to do with building an executable on Windows 7 and running it on a server as old as Windows 2003.
There are plans in the near future to move from Windows 2003 to Windows 2008. Until then, I would like to get some of my C tools to work on these Windows 2003 servers. _________________ Working with MQ since 2010. |
|
Back to top |
|
|
mqjeff |
Posted: Wed Mar 04, 2015 7:04 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Are you perhaps compiling/linking as a 64-bit executable?
Try adding /MACHINE:X86 to your LFLAGS. |
|
Back to top |
|
|
Michael Dag |
Posted: Wed Mar 04, 2015 7:06 am Post subject: |
|
|
Jedi Knight
Joined: 13 Jun 2002 Posts: 2602 Location: The Netherlands (Amsterdam)
|
|
Back to top |
|
|
tczielke |
Posted: Wed Mar 04, 2015 9:04 am Post subject: |
|
|
Guardian
Joined: 08 Jul 2010 Posts: 941 Location: Illinois, USA
|
That link did the trick!
Thank you both for the help. This was a 32 bit executable. _________________ Working with MQ since 2010. |
|
Back to top |
|
|
RogerLacroix |
Posted: Tue Mar 10, 2015 3:03 pm Post subject: |
|
|
Jedi Knight
Joined: 15 May 2001 Posts: 3258 Location: London, ON Canada
|
I use MS Visual C++ Express 2010 but don't use the GUI.
I installed the following on Window 7 Pro 64-bit:
- MS Visual C++ Express 2010
- MS Windows SDK x64
- Eclipse
I use Eclipse as the GUI and I create make files for each project. I have been doing this for a very long time. I used to use Eclipse with MQ Visual Studio 6.
If you want a makefile sample, then go grab the download for the MMX project.
I wish IBM would support GCC on Windows. I have it install and can build MQ projects with GCC but always switch back to MS Visual C++.
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
|
tczielke |
Posted: Tue Mar 10, 2015 3:48 pm Post subject: |
|
|
Guardian
Joined: 08 Jul 2010 Posts: 941 Location: Illinois, USA
|
Thanks for the tips! The development tools you are using there are more advanced than what I use. Mine are more along the lines of skunkworks . . . _________________ Working with MQ since 2010. |
|
Back to top |
|
|
mqjeff |
Posted: Wed Mar 11, 2015 5:42 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I've done almost all of my C development for the last 9 years in Eclipse/VCC/winSDK.
All the linux C dev I've done, I've done on eclipse locally and pushed things to unix machines for compiling.
even for skunkworks kind of things. It's just much nicer to have a decent editor that I don't have to go to baroque lengths to ensure has black text on a white background, with easy to adjust syntax coloring... |
|
Back to top |
|
|
tczielke |
Posted: Wed Mar 11, 2015 5:45 am Post subject: |
|
|
Guardian
Joined: 08 Jul 2010 Posts: 941 Location: Illinois, USA
|
All good points. I will take a closer look at these developer tools. I was using vi on Unix/Linux. Old school for sure, but I have learned a lot on how to use the vi editor . _________________ Working with MQ since 2010. |
|
Back to top |
|
|
mqjeff |
Posted: Wed Mar 11, 2015 6:38 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
tczielke wrote: |
All good points. I will take a closer look at these developer tools. I was using vi on Unix/Linux. Old school for sure, but I have learned a lot on how to use the vi editor . |
I've been using GUI text editors for a *long* time... I know my way around VI, but mostly just to get certain things done.
And, again, I strongly prefer black text on white backgrounds, and I don't want to have to remember how to fiddle with VI to make that happen. |
|
Back to top |
|
|
smdavies99 |
Posted: Wed Mar 11, 2015 7:30 am Post subject: |
|
|
Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
mqjeff wrote: |
And, again, I strongly prefer black text on white backgrounds, and I don't want to have to remember how to fiddle with VI to make that happen. |
Wot! no 3270 green Screen? Aren't they de-rigeur in IBM _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
|
mqjeff |
Posted: Wed Mar 11, 2015 7:32 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
smdavies99 wrote: |
mqjeff wrote: |
And, again, I strongly prefer black text on white backgrounds, and I don't want to have to remember how to fiddle with VI to make that happen. |
Wot! no 3270 green Screen? Aren't they de-rigeur in IBM |
Did you see the recent thing where they've got a full PDP-11 running on a smart phone?
I was trying to find out if they'd been able to use the camera to read punched cards.
So I could then write an app that would produce images of punched cards. |
|
Back to top |
|
|
smdavies99 |
Posted: Wed Mar 11, 2015 8:49 am Post subject: |
|
|
Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
mqjeff wrote: |
Did you see the recent thing where they've got a full PDP-11 running on a smart phone?
I was trying to find out if they'd been able to use the camera to read punched cards.
So I could then write an app that would produce images of punched cards. |
Te-He.... I have RSX-11/M-Plus running on my 11/73. A bit bigger than a phone but a lot ot fun even today. I think there is even a copy of the 3270 Emulator on a disk somewhere. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
|
RogerLacroix |
Posted: Wed Mar 11, 2015 3:57 pm Post subject: |
|
|
Jedi Knight
Joined: 15 May 2001 Posts: 3258 Location: London, ON Canada
|
tczielke wrote: |
Thanks for the tips! The development tools you are using there are more advanced than what I use. Mine are more along the lines of skunkworks . . . |
If you don't mine using an unsupported compiler then go grab GCC for Windows and your MS runtime headaches will disappear. As I said, I've used GCC for Windows for years and never had any issues, I just don't give the gcc built executables to anyone.
I like the tdm-gcc release. I installed the 64-bit bundle a couple of years ago. I'm too lazy to update it - hey, it works.
Since you are a Linux geek, then creating makefiles should be old school to you.
Here's a makefile using GCC for Windows to build amqsget:
Code: |
#
# GCC makefile
#
all: amqsget.exe amqsgetc.exe
# CC defines the compiler.
CC = gcc
# Set CCOPTS - the compiler options.
CCOPTS = -c
# MQM directories
MQMLIB = "D:\Program Files\IBM\WebSphere MQ\Tools\Lib"
MQMINC = "D:\Program Files\IBM\WebSphere MQ\Tools\c\include"
CLNTLIBS = -lm -lmqic
LIBS = -lm -lmqm
OBJS = amqsget0.o
amqsgetc.exe : $(OBJS)
$(CC) -o amqsgetc.exe $(OBJS) -L$(MQMLIB) -L. $(CLNTLIBS)
amqsget.exe : $(OBJS)
$(CC) -o amqsget.exe $(OBJS) -L$(MQMLIB) -L. $(LIBS)
amqsget0.o : amqsget0.c
#the object files depend on the corresponding source files
.c.o:
$(CC) $(CCOPTS) -I. -I$(MQMINC) $<
clean:
del *.exe *.o |
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
|
|