Recent

Author Topic: How to config? (and missing wincrt)  (Read 12352 times)

ursatempest

  • New Member
  • *
  • Posts: 13
How to config? (and missing wincrt)
« on: October 15, 2016, 02:24:18 am »
Alright, first of let me start by seeing I'm new at Linux. Like, barely three-weeks new. Anyway...

So I first installed fpc (I like Lazarus look, but since this is just for my class I don't think I'll need full-blown IDE), throw a simple square area calculator, and see if it compiles. It doesn't. Fpc report missing unit.

I googled a bit, and apparently it's common problem. Thing is, I literally don't understand the troubleshooting guide about missing unit on the wiki. Like, it doesn't make sense to me.

So I decided to just install every 'unit' plugin on repo, and it still doesn't fixed it. A more thorough googling later, I determined the problem is config file, since it uses .cfg on Documents and /home/

Then I decided to change the config file path, except.. I don't know how! How do I change it?

lainz

  • Hero Member
  • *****
  • Posts: 4741
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: How to config? (and missing wincrt)
« Reply #1 on: October 15, 2016, 02:40:17 am »
Wincrt http://www.freepascal.org/docs-html/rtl/wincrt/index.html

Is for windows. Because that is not available under Linux.
« Last Edit: October 15, 2016, 02:58:36 am by lainz »

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: How to config? (and missing wincrt)
« Reply #2 on: October 15, 2016, 02:42:23 am »
Hi ursatempest,

Your first post and so much trouble already  :'(

Being new to linux i can't really help with but you can attempt to figure some things out on your own.

For instance, under linux fpc uses the following order as described in this link when searching for it's fpc.cfg file (that is assuming you are using the commandline compiler and not fp-IDE text editor).

In addition to that you can add the option -va to your compile instruction so that fpc spills some information at you. Be warned it is a very long list but, you are looking for something at the top, namely which config file it uses (if any). It also shows you where it attempt to find all the files (including fpc.cfg) so that you are able to look for yourself if these directories (and filenames) exist at those locations or not.
« Last Edit: October 15, 2016, 02:44:43 am by molly »

ursatempest

  • New Member
  • *
  • Posts: 13
Re: How to config? (and missing wincrt)
« Reply #3 on: October 15, 2016, 02:50:55 am »
Wincrt http://www.freepascal.org/docs-html/rtl/wincrt/index.html

Is for windows. Because that is not available under Linux.

Any linux equivalent? crt, maybe?

I recall changing it to crt, and it still returns missing unit.

EDIT: Oh right, here is the -va result:

http://pastebin.com/xJPkHiYw
« Last Edit: October 15, 2016, 02:55:50 am by ursatempest »

lainz

  • Hero Member
  • *****
  • Posts: 4741
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: How to config? (and missing wincrt)
« Reply #4 on: October 15, 2016, 02:57:03 am »
I changed to crt on Ubuntu and it works and compiles, so it's a problem with your configuration or installation.

You installed FPC 3.0 and FPC-SRC 3.0 right?

Maybe you can uninstall it, to do that I use synaptic package manager, and then install it again.

I've installed today on Ubuntu and the installation was with no problems.

If problem persist, maybe you want to try installing lazarus too, is just another IDE.
« Last Edit: October 15, 2016, 02:59:36 am by lainz »

ursatempest

  • New Member
  • *
  • Posts: 13
Re: How to config? (and missing wincrt)
« Reply #5 on: October 15, 2016, 03:00:49 am »
I changed to crt on Ubuntu and it works and compiles, so it's a problem with your configuration or installation.

You installed FPC 3.0 and FPC-SRC 3.0 right?

Maybe you can uninstall it, to do that I use synaptic package manager, and then install it again.

I've installed today on Ubuntu and the installation was with no problems.

If problem persist, maybe you want to try installing lazarus too, is just another IDE.

I did! Many times. Can't remember how many times I've install-reinstall.

And yes, I'm fairly sure the problem is config. It's just I don't know how to fix it!

lainz

  • Hero Member
  • *****
  • Posts: 4741
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: How to config? (and missing wincrt)
« Reply #6 on: October 15, 2016, 03:07:32 am »
Try lazarus.

Handoko

  • Hero Member
  • *****
  • Posts: 5524
  • My goal: build my own game engine using Lazarus
Re: How to config? (and missing wincrt)
« Reply #7 on: October 15, 2016, 03:10:01 am »
Hello.

I'm not here to provide solution. I'm the unlucky guy too. Now matter how I tried and followed the documentation and forum instructions, I never make CRT work on Ubuntu Mate 64 bit.

Hope someone can fix it on the future.

Try lazarus.

That's what I used.

ursatempest

  • New Member
  • *
  • Posts: 13
Re: How to config? (and missing wincrt)
« Reply #8 on: October 15, 2016, 03:12:46 am »

lainz

  • Hero Member
  • *****
  • Posts: 4741
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: How to config? (and missing wincrt)
« Reply #9 on: October 15, 2016, 03:16:55 am »
That's really common and strange.

I'm using Ubuntu 32 and Ubuntu 64 version 16.04, and in both I have FPC 3.0 + src + Lazarus 1.6 and working perfectly, installing components, etc. Installed from the download on the sourceforge page not from command line.

To rebuild the ide I needed to install this:

Quote
sudo apt-get install libxtst-dev

And then the IDE was built.

ursatempest

  • New Member
  • *
  • Posts: 13
Re: How to config? (and missing wincrt)
« Reply #10 on: October 15, 2016, 03:30:31 am »
Just uninstall then reinstall Lazarus. Yep, still get 'can't find crt' error.

If it helps, Lazarus opened my previous test project, so maybe some part aren't uninstalled. Any way to cleanly remove it?

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: How to config? (and missing wincrt)
« Reply #11 on: October 15, 2016, 03:33:53 am »
@Handoko/ursatempest
Hmz, wierd. it should be inside rtl-console directory together with units keyboard, mouse and video.

At least for ursatempest: it seems your configuration is ok. At least it finds the other necessary files.

For handoko: perhaps rtl-console is disabled for 64 bit targets by default ?

lainz

  • Hero Member
  • *****
  • Posts: 4741
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: How to config? (and missing wincrt)
« Reply #12 on: October 15, 2016, 03:45:13 am »
Just uninstall then reinstall Lazarus. Yep, still get 'can't find crt' error.

If it helps, Lazarus opened my previous test project, so maybe some part aren't uninstalled. Any way to cleanly remove it?

Try to uninstall it with synaptic

sudo apt-get install synaptic

Then search and check for uninstall all the lazarus and fpc stuff.

If that doesn't help, open with the program that you use to open zip the deb packages and check inside where are installed and remove them by hand.

/etc/lazarus/*
/usr/bin/ (just the shortcuts)
/usr/share/lazarus/
/usr/share/ (some folders like applications, doc, man, mime, pixmaps)

/usr/bin/ (a lot of files)
/urs/lib/fpc/*
/usr/share/doc/fpc (and) fpc-3.0.0

/usr/share/doc/fpc-src/*
/usr/share/fpcsrc/*

ursatempest

  • New Member
  • *
  • Posts: 13
Re: How to config? (and missing wincrt)
« Reply #13 on: October 15, 2016, 03:53:47 am »
Alright, I've marked and remove them all using Synaptic. Completely remove them, to be precise. It appears there's not-empty folder?

http://pastebin.com/fFtWminE

I'll see if I can remove them manually.

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: How to config? (and missing wincrt)
« Reply #14 on: October 15, 2016, 03:58:01 am »
@lainz:
sorry, now i read (too lat) that you also have 64 bit version installed.

Are you sure crt unit is available for that target ?

 

TinyPortal © 2005-2018