User forums > Using Code::Blocks

[SOLVED]Strange behavior in xterm

(1/1)

perosoft:
Hi,

Using codeblocks with gcc compiler, linux.
When i run program in codeblocks, xterm appear.
In source i have a system call: system("latex");
Result is: sh: line 1: latex: command not found.
But if i simple launch xterm latex is found.
Launching xterm by codeblocks does not find latex.

If i launch codeblocks from console all is fine xterm find latex
Details
Host: arch Kernel: 6.13.2-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
Desktop: KDE Plasma v: 6.3.0 Distro: Arch Linux

Sugestions, please !



stahta01:
Posting the result of below from the system shell might help


--- Code: ---which latex
--- End code ---

perosoft:
This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024) (preloaded format=latex)
 restricted \write18 enabled.

which latex
/usr/local/texlive/2024/bin/x86_64-linux/latex

user .bashrc

cat .bashrc
#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
alias grep='grep --color=auto'
PS1='[\u@\h \W]\$ '

export PATH="/usr/local/texlive/2024/bin/x86_64-linux:$PATH"

Михаил Агарков:
You need to do system("/usr/local/texlive/2024/bin/x86_64-linux/latex");
instead or install latex in /usr/bin/ for it to work AFAIK.

perosoft:
Prior to archlinux, i have kubuntu.
All work with no problems.
This problem apear on arch linux
And yes, system("/usr/local/texlive/2024/bin/x86_64-linux/latex");, working.
Thank you !

Navigation

[0] Message Index

Go to full version