Mapbasic commandline compilation

248 views
Skip to first unread message

Uffe Kousgaard

unread,
Mar 4, 2016, 2:04:56 AM3/4/16
to mapi...@googlegroups.com
Does anyone have documentation about mapbasic compilation from the
command line?

I have found this much from http://www.twiav.nl/php/mapbasic.php:
call MAPBASIC.EXE -server -D test.mb

But there have to be more and official details?

Regards
Uffe Kousgaard

Bill Thoen

unread,
Mar 4, 2016, 2:48:32 AM3/4/16
to mapi...@googlegroups.com
Hmm.... I remember one of the switches was -NOSPLASH which suppressed the splash screen from appearing, also the -D and -L switches for compiling and linking, respectively, and I remember reading the section under "compile/link from file" in the printed docs (when such things once existed), but it's interesting that there's not much about it in the online docs nowadays. The -server switch was news to me. I don't believe I've ever seen anything official written in the virtual format.
> --
> --
> You received this message because you are subscribed to the Google Groups "MapInfo-L" group.To post a message to this group, send email to mapi...@googlegroups.com
> To unsubscribe from this group, go to:
> http://groups.google.com/group/mapinfo-l/subscribe?hl=en
> For more options, information and links to MapInfo resources (searching
> archives, feature requests, to visit our Wiki, visit the Welcome page at
> http://groups.google.com/group/mapinfo-l?hl=en
>
> --- You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Lars I. Nielsen (GisPro)

unread,
Mar 4, 2016, 2:49:01 AM3/4/16
to mapi...@googlegroups.com
Hi Uffe,

"mapbasic.exe -D filename.mb" to compile
"mapbasic.exe -L filename.mbp" to link


Best regards / Med venlig hilsen
Lars I. Nielsen
GIS & DB Integrator
GisPro








Peter Horsbøll Møller

unread,
Mar 4, 2016, 3:09:10 AM3/4/16
to mapi...@googlegroups.com

From the MapBasic User Guide:

 

Compiling and Linking Programs From the Command Line

If you use a text editor other than MapBasic to edit your programs, you may find it awkward switching to MapBasic whenever you want to compile or link your application. However, there is a way to automate the process of compiling and linking: if you can configure your text editor so that it issues a command string, then you can compile programs without leaving your editor.

 

You can start the MapBasic development environment by executing the command:

mapbasic

 

If the command line also includes the parameter -D followed by one or more program names, MapBasic automatically compiles the program files. For example, the following command line launches MapBasic and compiles two program files (main and sub1):

mapbasic -D main.mb sub1.mb

 

If the command line includes the parameter -L followed by one or more project file names, MapBasic links the projects. (Linking and Project files are discussed in Compiling and Linking a Project.). For example, the following command line links the TextBox application:

mapbasic -L tbproj.mbp

 

The command line can include both the -D and the -L parameters, as shown below:

mapbasic -D textbox.mb -L tbproj.mbp

 

If you launch MapBasic with a command line that includes the -D parameter or the -L parameter, MapBasic shuts down after compiling or linking the appropriate files.

 

To start MapBasic without displaying a splash screen use the -Nosplash parameter:

mapbasic -Nosplash

 

Peter Horsbøll Møller

EMEA Channel Enablement Specialist

Location Intelligence | MapInfo

 

M: +45 29 133 769

peter....@pb.com | @phorsbollmoller

pitneybowes.com/dk | mapinfo.com

--

--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to


To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en

---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Uffe Kousgaard

unread,
Mar 4, 2016, 4:32:11 AM3/4/16
to mapi...@googlegroups.com
I am still looking forward to the day, when all MapInfo and MapBasic documentation is ONE document only.

Regards
Uffe Kousgaard


Peter Horsbøll Møller wrote:

From the MapBasic User Guide:

.....


Lars I. Nielsen (GisPro)

unread,
Mar 4, 2016, 5:52:13 AM3/4/16
to mapi...@googlegroups.com
Print and bind MAPINFO-L entries as a book volume series ?? :-)



Best regards / Med venlig hilsen
Lars I. Nielsen
GIS & DB Integrator
GisPro








Peter Horsbøll Møller

unread,
Mar 4, 2016, 6:28:43 AM3/4/16
to mapi...@googlegroups.com

I think that was done a while back – not printed though

 

Peter Horsbøll Møller

EMEA Channel Enablement Specialist

Location Intelligence | MapInfo

 

M: +45 29 133 769

peter....@pb.com | @phorsbollmoller

pitneybowes.com/dk | mapinfo.com

 

From: mapi...@googlegroups.com [mailto:mapi...@googlegroups.com] On Behalf Of Lars I. Nielsen (GisPro)
Sent: 4. marts 2016 12:02
To: mapi...@googlegroups.com
Subject: Re: [MI-L] Mapbasic commandline compilation

 

Print and bind MAPINFO-L entries as a book volume series ?? :-)

Bill Thoen

unread,
Mar 4, 2016, 12:24:04 PM3/4/16
to mapi...@googlegroups.com
What's the -server switch for then?

Peter Horsbøll Møller

unread,
Mar 6, 2016, 2:21:11 PM3/6/16
to mapi...@googlegroups.com

Good question, Bill.

I can see that MapBasic is started in a “hidden” mode if you use the –server switch.

I have never used it before.

 

Maybe it starts faster and just shuts down when it has compiled the module?

 

Let me check.

 

Peter Horsbøll Møller

EMEA Channel Enablement Specialist

Location Intelligence | MapInfo

 

M: +45 29 133 769

peter....@pb.com | @phorsbollmoller

pitneybowes.com/dk | mapinfo.com

 

Lars I. Nielsen (GisPro)

unread,
Mar 6, 2016, 2:33:05 PM3/6/16
to mapi...@googlegroups.com
I seem to recall (with Pro, but it may be the same with MB) that the "-server" argument puts the EXE in "sleep mode" waiting for external input. I.e. acts as a "server" for later requests via DDE or OLE or something else.

It makes sense with Pro, but I'm not entirely sure why that would be a good idea with MapBasic, minding its rather simplistic workflow.

Sancarn

unread,
Mar 9, 2016, 5:43:01 PM3/9/16
to MapInfo-L, L...@gispro.dk
This.

I contacted PBS-Support a few weeks ago about this very issue. I had an HTML application (akin to the GE-Link utility but using Google Maps instead) which I wanted to have a "backwards link" so the map software could actively update the MapInfo tables. They suggested I setup a DDE/OLE server in javascript. I am still yet to try this and finish the project. Definitely on my to do list! Give us a shout and let us know how you get on if you do make a DDE/OLE connection :)
Reply all
Reply to author
Forward
0 new messages