Moving Lapack++ dependent code to windows

This is a discussion on Moving Lapack++ dependent code to windows within the C++ Programming forums, part of the General Programming Boards category; I've written some code that makes heavy use of Lapack++ to do computations. The code compiles and runs correctly on ...

  1. #1
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916

    Moving Lapack++ dependent code to windows

    I've written some code that makes heavy use of Lapack++ to do computations. The code compiles and runs correctly on my linux machine using GCC 3.3.5. The code is probably not of interest to anyone for this post, but here is my makefile:
    Code:
    cc =  g++
    trg   =  yeh_bandgap
    src   =  yeh_bandgap.cpp utilities.cpp
    flags =  -W -Wall -O3 -I/usr/local/include/lapackpp -L/usr/local/lib -llapackpp
    
    all:
       $(cc) $(flags) -o $(trg) $(src)
    
    clean:
       rm *.o $(trg)
    Now I must unfortunately move the code to Windows. It's just a command line program (no GUI); I just need it to correctly compile and link with Lapack++. We have access to MSVC and any free solutions. I tried (for varying amounts of time) MSVC, MinGW, and gcc through Cygwin (although I'd prefer a native solution, not an emulator). I wasn't able to link with the Lapack++ libraries using any of these methods, probably because I am unfamiliar with the compilers.

    Does anyone have suggestions on which compiler I should use, and how to correctly link to the Lapack++ libraries? I'd like to make as few changes to the code as possible (ideally, none).
    Away.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,484
    You need two things:
    - fix the paths in the makefile to reflect the new locations.
    - recompile the Lapack library (if you have all the source), or get a library from the home site which is compatible with your chosen machine/compiler.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Moving code from C to C++
    By Elixia in forum C++ Programming
    Replies: 3
    Last Post: 06-07-2003, 08:34 PM
  2. FlashWindowEx not declared?
    By Aidman in forum Windows Programming
    Replies: 3
    Last Post: 05-17-2003, 02:58 AM
  3. windows console code probs
    By henroid815 in forum C++ Programming
    Replies: 1
    Last Post: 05-04-2003, 05:53 PM
  4. Source Code To Windows 98, LMAO
    By Generator in forum A Brief History of Cprogramming.com
    Replies: 28
    Last Post: 10-23-2001, 07:01 AM
  5. The Windows 95 source code
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 09-23-2001, 07:42 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21