ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
But I'm curious why you (somebody with "guru" status, no less!) would ask a question like this. In particular, I'm curious:
a) If you're writing something for use with Office 2007... then I presume you have access to Windows. So why would you want to use Linux for this particular task in the first place?
b) I presume you're writing some kind of plug-in or add-on to MS Office. Then again, maybe you're writing something that invokes MS Office (and uses Word functionality as a "service"). Either way, why does it need to be a .dll? As opposed to an .exe? Or even better, a script or macro of some kind?
In short: What's the goal? What are your constraints? And what are your preferences? Knowing these would help us answer the question more intelligently.
Thanx in advance .. PSM
PS:
Even if you decide to go with MSVS - you don't actually have to buy anything if you don't want to. You can always download VS2008 Express:
I don't see why it's so out there. It's quite possible to cross compile across many systems as I recall. I found various references to Windows APIs for Linux around the place, but nothing on DLLs per se.
The answer to (a) is because I will have to buy Visual C++ to do it is the short answer (notwithstanding your ps). It's some years since I wrote a DLL, so I'm ultra rusty on this one.
The answer to (b) is I'm writing a custom function (or set of functions) for Excel. Converting from VBA because it's too slow.
As I said, I suspected I knew the answer, but just in case I thought I'd ask.
Does VS include C++? I spent 1/2hr digging around on the Windows site and came out knowing about the same as when I went in. I did see the VS2008 Express download, but it really doesn't tell you a lot about what it includes.
Last edited by billymayday; 06-01-2009 at 11:09 PM.
Yes, MSVS still supports C++ (although Microsoft obviously wishes everybody would get on the .Net bandwagon, forget their old VB6 and C++/Win32 ways, and just program everything in C# or VB.Net and run it on the CLR):
Thanks Sergei, I feel at least partially vindicated. Could you suggest any useful links by any chance?
Paul, I having a chat with MS tomorrow to find out more about their offerings. I note the Express version lacks some libraries, so I'll have to find out if that relates to DLLs or not.
Cross-compiler build may fail with an error message about wrong checksum/md5sum - if so, let me know, I'll explain in detail what the problem is and how to fix it - it's not a problem in 'mingw_cross_env-2.5.tar.gz', but in a native MinGW tarball. And originally there were no problems, i.e. the problem appeared due to a change in the MinGW tarball which shouldn't have happened.
When you're done with the first two steps and when you gain traction with 'libtool' in native environment, I'll guide you further.
Cross-compiler build takes time; choose to build just the gcc core. You may build native 'libtool' while cross compiler is being built - native 'libtool' is independent from cross-gcc.
billymayday, I've thought about my previous post and I want to make one thing clear. I've been searching WEB a lot, and I haven't found one ready-made recipe - this thread may become one. I.e. the rest of the info I'm going to publish is what I more or less guessed (and it worked for me), that's why I'm not giving you further links - I simply do not have them.
from "make gcc libtool". I assume this is the error you referred to.
So, the problem is that the original mingwrt-3.15.2-mingw32-dev.tar.gz got modified by apparently non-cross MinGW developers, they added bin/mingwm10.dll file, but didn't change the md5sum.
The file has a "wrong" size now, which is 565306, it should be 562075.
According to 'diff -rq ....' it's the only difference.
Under your CWD there should be 'pkg' directory, ans there you should see all already downloaded tarballs - in my case:
Code:
pwd; ls -ltr
/home/sergei/junk/mingw_cross_env-2.5/pkg
total 73536
-rw-r--r-- 1 sergei users 11640890 2007-11-07 23:44 gettext-0.17.tar.gz
-rw-r--r-- 1 sergei users 4513309 2007-11-11 20:24 libiconv-1.12.tar.gz
-rw-r--r-- 1 sergei users 1032839 2008-01-17 00:54 pkg-config-0.23.tar.gz
-rw-r--r-- 1 sergei users 986373 2008-11-26 02:00 mpfr-2.3.2.tar.bz2
-rw-r--r-- 1 sergei users 1710660 2008-11-26 02:00 gmp-4.2.4.tar.bz2
-rw-r--r-- 1 sergei users 1634605 2008-12-06 04:38 w32api-3.13-mingw32-dev.tar.gz
-rw-r--r-- 1 sergei users 562075 2009-01-10 23:53 mingwrt-3.15.2-mingw32-dev.tar.gz
-rw-r--r-- 1 sergei users 24355225 2009-02-10 23:47 gcc-core-4.3.3.tar.bz2
-rw-r--r-- 1 sergei users 1212708 2009-02-10 23:47 gcc-fortran-4.3.3.tar.bz2
-rw-r--r-- 1 sergei users 5638200 2009-02-10 23:47 gcc-g++-4.3.3.tar.bz2
-rw-r--r-- 1 sergei users 230061 2009-02-10 23:48 gcc-objc-4.3.3.tar.bz2
-rw-r--r-- 1 sergei users 23901 2009-02-16 03:11 gcc-4.3.3-tdm-1-srcbase.zip
-rw-r--r-- 1 sergei users 21601735 2009-03-12 16:02 binutils-2.19.1-src.tar.gz
sergei@amdam2:~/junk/mingw_cross_env-2.5/pkg>
So, unpack mingwrt-3.15.2-mingw32-dev.tar.gz, remove the
bin/mingwm10.dll
including directory - there is no 'bin' directory in the correct taraball, and repack it back.
If this doesn't help, tell me (through PM if you wish) where (to what Email) to send the correct tarball.
Just because you *can* eat string beans through your nose ... doesn't necessarily mean that you *should*.
"Mingw" is emphatically *not* the first choice for a job like this. I'd consider lots of other alternatives - including OpenWatcom - before I'd go there. And I would certainly *not* cross-compile on Linux for a target on Windows (if, in fact, that's what you're suggesting). Any more than I'd cross compile a Linux target on a Windows compiler... "Native" is almost always preferable - and MS Visual Studio for an MS product on an MS platform is, for better or worse, a win.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.