Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Thu Jul 19, 2018 1:50 pm

All times are UTC




Post new topic  Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Wed Jun 07, 2017 12:19 pm 
Online
Transport Coordinator
Transport Coordinator
User avatar

Joined: Mon May 25, 2015 9:09 am
Posts: 274
Location: The Netherlands
I'm currently working on a track set for maglev trains, which will contain 5 railtypes. When I compile the code, however. At most 2 tracks will show up in the game. I can only get the other one to show up if I comment out one of the ones that did show up.
Am I missing something?

Source in the attachments.


Attachments:
File comment: Source last compiled
MTS source.rar [32.55 KiB]
Downloaded 21 times
File comment: the latest working version of the track set.
Maglev_Track_Set.grf [30.1 KiB]
Downloaded 21 times
File comment: A version of Modern Maglev trains to work with this set.
MMT.grf [165.61 KiB]
Downloaded 18 times

_________________
No pics no clicks. Seriously.
ImageImageImageImage
Top
   
PostPosted: Wed Jun 07, 2017 9:23 pm 
Online
Transport Coordinator
Transport Coordinator
User avatar

Joined: Mon May 25, 2015 9:09 am
Posts: 274
Location: The Netherlands
Update: I solved the problem. Turns out.
Code:
make -B

is case-sensitive.

_________________
No pics no clicks. Seriously.
ImageImageImageImage


Top
   
PostPosted: Fri Jun 09, 2017 4:34 pm 
Offline
Tycoon
Tycoon

Joined: Tue Feb 22, 2011 6:34 pm
Posts: 2640
Erato wrote:
Update: I solved the problem. Turns out.
Code:
make -B

is case-sensitive.

But why do you need the -B flag? What does it do and how does it solve your issue? Might be interesting to know, also for others, because I never needed the -B flag.

_________________
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML


Top
   
PostPosted: Fri Jun 09, 2017 7:14 pm 
Online
Transport Coordinator
Transport Coordinator
User avatar

Joined: Mon May 25, 2015 9:09 am
Posts: 274
Location: The Netherlands
Transportman wrote:
Erato wrote:
Update: I solved the problem. Turns out.
Code:
make -B

is case-sensitive.

But why do you need the -B flag? What does it do and how does it solve your issue? Might be interesting to know, also for others, because I never needed the -B flag.

I was told that the -B turns the .pnml file with all it's imports into one big .nml file, overwriting the .nml file that's already there.
This didn't happen when I had -b instead.

_________________
No pics no clicks. Seriously.
ImageImageImageImage


Top
   
PostPosted: Fri Jun 09, 2017 9:40 pm 
Offline
Tycoon
Tycoon

Joined: Tue Feb 22, 2011 6:34 pm
Posts: 2640
Erato wrote:
Transportman wrote:
Erato wrote:
Update: I solved the problem. Turns out.
Code:
make -B

is case-sensitive.

But why do you need the -B flag? What does it do and how does it solve your issue? Might be interesting to know, also for others, because I never needed the -B flag.

I was told that the -B turns the .pnml file with all it's imports into one big .nml file, overwriting the .nml file that's already there.
This didn't happen when I had -b instead.

There is no need to use the -B flag to do that, make without any flags also recreates the .nml file from your .pnml-files, and creates a .grf for it.

_________________
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML


Top
   
PostPosted: Fri Jun 09, 2017 9:43 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Mar 19, 2009 7:25 pm
Posts: 2609
Location: Kent
My makefile is just a .bat with the following command lines:

Code:
gcc -C -E -nostdinc -x c-header -o BRTrains.nml BRTrains.pnml
nmlc BRTrains.nml
PAUSE

_________________
Image


Top
   
PostPosted: Fri Jun 09, 2017 10:16 pm 
Online
Transport Coordinator
Transport Coordinator
User avatar

Joined: Mon May 25, 2015 9:09 am
Posts: 274
Location: The Netherlands
Transportman wrote:
Erato wrote:
Transportman wrote:
But why do you need the -B flag? What does it do and how does it solve your issue? Might be interesting to know, also for others, because I never needed the -B flag.

I was told that the -B turns the .pnml file with all it's imports into one big .nml file, overwriting the .nml file that's already there.
This didn't happen when I had -b instead.

There is no need to use the -B flag to do that, make without any flags also recreates the .nml file from your .pnml-files, and creates a .grf for it.

Thing is, if I do that, it doesn't overwrite the .nml file that's already there, and instead chooses to instead compile the .nml that's already there. Only if I remove the .nml file will it recreate a .nml file. Or at least, that's the case on my machine. And I know that for a fact because I went ahead and just tested it: a new NML file did not get made.

_________________
No pics no clicks. Seriously.
ImageImageImageImage


Top
   
PostPosted: Sat Jun 10, 2017 5:09 pm 
Offline
Engineer
Engineer

Joined: Wed May 24, 2017 12:51 pm
Posts: 23
Location: East Texas
Transportman wrote:
Erato wrote:
Update: I solved the problem. Turns out.
Code:
make -B

is case-sensitive.

But why do you need the -B flag? What does it do and how does it solve your issue? Might be interesting to know, also for others, because I never needed the -B flag.


Code:
       -B, --always-make
            Unconditionally make all targets.

I would guess that the makefile isn't set up with proper dependencies to support an incremental build. Or maybe it's a "make on windows" thing.

_________________
Unless otherwise stated, all my code is GPL v2.


Top
   
PostPosted: Sat Jun 10, 2017 6:10 pm 
Offline
Tycoon
Tycoon

Joined: Tue Feb 22, 2011 6:34 pm
Posts: 2640
rowdog wrote:
Transportman wrote:
Erato wrote:
Update: I solved the problem. Turns out.
Code:
make -B

is case-sensitive.

But why do you need the -B flag? What does it do and how does it solve your issue? Might be interesting to know, also for others, because I never needed the -B flag.


Code:
       -B, --always-make
            Unconditionally make all targets.

I would guess that the makefile isn't set up with proper dependencies to support an incremental build. Or maybe it's a "make on windows" thing.

I think it would then be in the makefile, as I never had to use the -B flag, not on Windows using MinGW or WSL

_________________
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2018 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2018.
Hosted by Zernebok Hosting.